import Vue from 'vue'
import VueRouter from 'vue-router'
import Xian from '../views/Xian.vue'
import Template from '../components/Template.vue'
import Spec from '../components/Spec.vue'
import Para from '../components/Para.vue'
import Category from '../components/Category.vue'
import Index from '../components/index/index.vue'
import SystemInfo from '../components/index/SystemInfo.vue'
import UserSetting from '../components/index/UserSetting.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: () => import('../views/Main.vue'),
    children: [
      {
        path: '/addCommodity',
        component: () => import('../views/good_commodity/AddCommodity.vue')
      },
      {
        path: '/commodityAudit',
        component: () => import('../views/good_commodity/CommodityAudit.vue')
      },
      {
        path: '/commodityEvaluation',
        component: () => import('../views/good_commodity/CommodityEvaluation.vue') // 商品评价
      },
      {
        path: '/commodityRecyclingStation',
        component: () => import('../views/good_commodity/CommodityRecyclingStation.vue') // 商品回收站
      },
      {
        path: '/productList',
        component: () => import('../views/good_commodity/ProductList.vue') // 商品列表
      },
      {
        path: '/Order',
        name: 'Order',
        component: () => import('../views/order/Order.vue') // 订单管理类
      },
      {
        path: '/OrderDetails',
        component: () => import('../views/order/OrderDetails.vue') // 订单管理类
      },
      {
        path: '/Invoice',
        name: 'Invoice',
        component: () => import('../views/order/Invoice.vue') // 订单
      },
      {
        path: '/BulkShipping',
        name: 'BulkShipping',
        component: () => import('../views/order/BulkShipping.vue') // 订单
      },
      {
        path: '/OrderConfig',
        name: 'OrderConfig',
        component: () => import('../views/order/OrderConfig.vue') // 订单
      },
      {
        path: '/OrderTrack',
        name: 'OrderTrack',
        component: () => import('../views/order/OrderTrack.vue') // 订单
      },
      {
        path: '/Receipt',
        name: 'Receipt',
        component: () => import('../views/order/Receipt.vue') // 订单
      },
      {
        path: '/Remind',
        component: () => import('../views/order/Remind.vue') // 订单
      },
      {
        path: '/OrderDetails',
        name: 'OrderDetails',
        component: () => import('../views/order/OrderDetails.vue') // 订单
      },
      {
        path: '/OrderModify',
        name: 'OrderModify',
        component: () => import('../views/order/OrderModify.vue') // 订单
      },
      {
        path: '/sta',
        component: () => import('../components/statis/Sta.vue') // 统计
      },
      {
        path: '/categoryreport',
        component: () => import('../components/statis/CategoryReport.vue') // 商品统计
      },
      {
        path: '/flow',
        component: () => import('../components/statis/Flow.vue') // 商品统计
      },
      {
        path: '/usertj',
        component: () => import('../components/statis/UserTJ.vue') // 用户统计
      },
      {
        path: '/album',
        component: () => import('../components/album/Index.vue') // 图片库管理
      },
      {
        path: '/detailed',
        component: () => import('../components/album/detailed.vue') // 图片库管理
      },
      {
        path: '/ReturnCause',
        component: () => import('../components/ReturnCause.vue') // 退货原因
      },
      {
        path: '/tuihuo',
        component: () => import('../components/tuihuo.vue') // 申请退货
      },
      {
        path: '/thfwd',
        component: () => import('../components/thfwd.vue') // 同意/拒绝退货
      },
      {
        path: '/tuikuai',
        component: () => import('../components/tuikuai.vue') // 申请退款
      },
      {
          path: '/tkfwd',
          component: () => import('../components/tkfwd.vue') // 同意/拒绝退款
      },
      {
        path: '/category',
        name: 'Category',
        component: Category
      },
      {
        path: '/template',
        name: 'Template',
        component: Template
      },
      {
        path: '/spec',
        name: 'Spec',
        component: Spec
      },
      {
        path: '/para',
        name: 'Para',
        component: Para
      },
      {
        path: '/brand',
        name: 'Xian',
        component: Xian
      },
      {
        path: '/systemIndex',
        name: 'Index',
        component: Index
      },
      {
        path: '/systemInfo',
        name: 'SystemInfo',
        component: SystemInfo
      },
      {
        path: '/userSetting',
        name: 'UserSetting',
        component: UserSetting
      }
    ]
  },
  {
    path: '/test',
    name: 'Test',
    component: () => import('../views/Test.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
